<div ng-controller="z-specialRequest-c" z-loading is-loading="viewModel.isLoading">
	<div viewstack class="carousel slide" data-ride="carousel">
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<div class="row">
                    <div class="col-lg-12 heading">
                        <ul id="crumb" class="breadcrumb">
	                       <li>
		                        <i class="im-home"></i>
		                        <a href="index.html">首页</a>
	                        </li>
	                        <li ng-repeat="menu in viewModel.menuList">
	                        	<i class="{{menu.icons}}" ng-if="$index+1!=viewModel.menuList.length"></i>
	                        	<i class="en-arrow-right7" ng-if="$index+1==viewModel.menuList.length"></i>
	                        	{{menu.label}}
	                        </li>
                        </ul>
                    </div>
                </div>
                <div class="outlet">
	                <div class="panel-body">
	                    <form class="form-horizontal group-border hover-stripped" role="form">
	                        <div class="row">
	                            <div class="col-lg-2 col-md-1">
									<button class="btn btn-success" ng-click="viewModel.add()">特殊情况申请</button>
	                            </div>
	                        </div>
	                    </form>
	                </div>
                </div>
                <div class="outlet">
	                <div class="panel-body">
	                    <form class="form-horizontal group-border hover-stripped" role="form" name="form">
	                        <div class="row">
	                        	<div class="col-xs-12 col-sm-10 col-md-11 form-box">
	                        	    <div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-5 col-md-5 form-title">申请日期：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.requestStartDate.$invalid && !form.requestStartDate.$pristine }">
												<input name="requestStartDate" 
													   ng-model="viewModel.requestStartDate" 
													   class="form-control datetime-picker" 
													   type="text"
													   ng-click="viewModel.startDateOpen($event)"
													   autofocus="autofocus" 
													   maxLength="10"
													   z-datepicker-popup="{{viewModel.format}}"
													   is-open="viewModel.startDateOpened"
													   datepicker-options="viewModel.dateOptions"
												       close-text="Close"
												       required>
												<span class="input-group-addon cursorPointer" ng-click="viewModel.startDateOpen($event)"><i class="fa-calendar"></i></span>
											</div>
										</div>
									</div>
									<div class="col-sm-6 col-md-4 col-lg-3 form-item">
										<div class="col-sm-2 col-md-2 form-title">至：</div>
										<div class="col-sm-7 col-md-7 form-input">
											<div class="input-group" ng-class="{ 'has-error' : form.requestEndDate.$invalid && !form.requestEndDate.$pristine }">
												<input 
													   name="requestEndDate" 
													   ng-model="viewModel.requestEndDate" 
													   class="form-control datetime-picker" 
													   type="text"
													   ng-click="viewModel.endDateOpen($event)"
													   autofocus="autofocus" 
													   maxLength="10"
													   z-datepicker-popup="{{viewModel.format}}"
													   is-open="viewModel.endDateOpened" 
													   datepicker-options="viewModel.dateOptions"
												       close-text="Close"
												       required>
												<span class="input-group-addon cursorPointer" ng-click="viewModel.endDateOpen($event)"><i class="fa-calendar"></i></span>
											</div>
										</div>
									</div>
									<div class="col-sm-3 col-md-4 col-lg-3 form-item">
										<div class="col-lg-1 col-md-1">
											<button type="button" class="btn btn-success" ng-click="viewModel.validForm(form.$valid)">搜索</button>
			                            </div>
									</div>
								</div>
	                        </div>
	                    </form>
	                </div>
                </div>
				<div class="container-fluid">
					<div class="row">
						<!-- <table class="table table-striped  table-bordered table-hover"> -->
						<table class="table table-striped table-bordered" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th width="10%">特殊情况日期</th>
									<th width="10%">申请类型</th>
									<th width="13%">申请日期</th>
									<th width="6%">审批状态</th>
									<th>申请说明</th>
									<th width="16%">操作</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="request in viewModel.dataList">
									<td>{{request.startDate | date:'yyyy/MM/dd'}}</td>
									<td>{{request.requestType}}</td>
									<td>{{request.requestDate | date:'yyyy/MM/dd HH:mm:ss'}}</td>
									<td>{{request.approvalStateName}}</td>
									<td>{{request.description}}</td>
									<td>
										<button type="button" class="btn btn-info btn-sm" ng-disabled="viewModel.isDisabled(request)" ng-click="viewModel.submit(request)">提交</button>
										<button type="button" class="btn btn-primary btn-sm" ng-disabled="viewModel.isDisabled(request)" ng-click="viewModel.update(request)">修改</button>
										<button type="button" class="btn btn-danger btn-sm" ng-disabled="viewModel.isDisabled(request)" ng-click="viewModel.del($index,request)">删除</button>	
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="row">
						<div z-Pagination total-Data='viewModel.totalData'
							per-Page='viewModel.perPage'
							current-Page='viewModel.rowCount'
							on-Click="viewModel.bindData()"
							on-Change-Per-Page="viewModel.bindData()"></div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<z-Dialog show-Save-Btn="true" show-Submit-Btn="true"
	have-Error-Class="false" 
	load-Url="static/html/specialRequest/specialRequestEdit.html" 
	title="{{editModel.title}}" 
	show="viewModel.show"
	cancel-fn="viewModel.unLoad()"
	save-fn="viewModel.save()"
	submit-fn="viewModel.saveSubmit()"></z-Dialog>
</div>